package com.homework.module6part3.service.impl;

import com.homework.dao.domain.Goods;
import com.homework.dao.mapper.GoodsMapper;
import com.homework.module6part3.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    protected GoodsMapper goodsMapper ;

    public Goods getGoodsByCode(String code) {
        return goodsMapper.getGoodsByCode(code);
    }

    public Goods getGoodsById(int id) {
        return goodsMapper.getGoodsById(id);
    }

    public boolean backStock(int goodsId) {
        return goodsMapper.backStock(goodsId);
    }

}
